import Vue from 'vue'

const fullscreen = Vue.directive('fullscreen', {
  update: function (el, binding) {
    if (binding.value === 'true' || binding.value === true) {
      el.style.position = 'fixed'
    } else {
      el.style.position = 'initial'
    }
  }
})

export default fullscreen
